Refactor/vim.pack#2005
Conversation
|
Great work, I am strongly in favor of using vim.pack Startup Time Diff Lazy Loading |
e4b8f93 to
bcf7a2c
Compare
|
I also did some testing of my own and the results are promising :) It seems that after adding
Relevant system info: orip@Ori-pc ~/.c/upstream-kickstart (refactor/vim.pack)> inxi
CPU: 8-core AMD Ryzen 7 5800X (-MT MCP-) speed/min/max: 4195/614/5363 MHz
Kernel: 7.0.0-200.nobara.fc43.x86_64 x86_64 Up: 2d 13h 8m
Mem: 9.5/31.25 GiB (30.4%) Storage: 5.48 TiB (12.0% used) Procs: 511
Shell: fish inxi: 3.3.40
orip@Ori-pc ~/.c/upstream-kickstart (refactor/vim.pack)> nvim --version
NVIM v0.12.1
Build type: Release
LuaJIT 2.1.1774638290
orip@Ori-pc ~/.c/upstream-kickstart (refactor/vim.pack)> ghostty --version
Ghostty 1.3.1
Version
- version: 1.3.1
- channel: stable
Build Config
- Zig version : 0.15.2
- build mode : .ReleaseFast
- app runtime : .gtk
- font engine : .fontconfig_freetype
- renderer : renderer.generic.Renderer(renderer.OpenGL)
- libxev : io_uring
- kernel version: 7.0.0-200.nobara.fc43.x86_64
- desktop env : other
- GTK version :
build : 4.20.3
runtime : 4.20.4
- libadwaita : enabled
build : 1.8.4
runtime : 1.8.5
- libX11 : enabled
- libwayland : enabled |
|
I just converted my own configs to use vim.pack exclusively without any issues; and the startup time is not noticeable at all between vim.pack and lazy.nvim. Given that the current config uses lazy require at each relevant point in the file, I would favor replicating that with vim.pack. I think it would be clearer for users that all related code are grouped together. |
00f3503 to
e26f2ac
Compare
e26f2ac to
e4916fd
Compare
|
I reordered the sections a bit, and surrounded each of them I think this is pretty much ready, so I would love to hear some feedback before merging - especially about the comments, explanations, and overall structure :) |
| do | ||
| -- [[ Install plugins with `vim.pack` ]] | ||
| -- See `:help vim.pack`, `:help vim.pack-examples` or | ||
| -- the excellent blog post from the creator of mini.nvim https://echasnovski.com/blog/2026-03-13-a-guide-to-vim-pack |
There was a problem hiding this comment.
| -- the excellent blog post from the creator of mini.nvim https://echasnovski.com/blog/2026-03-13-a-guide-to-vim-pack | |
| -- the excellent blog post from the creator of vim.pack https://echasnovski.com/blog/2026-03-13-a-guide-to-vim-pack |
| -- Highlight todo, notes, etc in comments | ||
| require('todo-comments').setup { signs = false } | ||
|
|
||
| -- Collection of various small independent plugins/modules |
There was a problem hiding this comment.
This line feels a little bit out of context now. Maybe you could do something like [[ mini.nvim ]] above it
e4916fd to
77ed7c9
Compare
|
I don't have any opinion on lazy/pack. Just the request, if kickstart switches to vim.pack, please add a doc for how to migrate lazy based config for the newbs. And maybe add a min Version check for vim 0.12 somewhere. |
|
@Christoph-Raab In case you are looking for some resources to get started with right now, I would recommend reading this blog from the creator of vim.pack. It's got plenty of resources and a linked youtube video as well. The relevant section where migration from lazy.nvim is discussed is here but I would suggest reading the entire thing start to finish. |
|
I think vim.pack.add near each relevant require is better option than one big vim.pack.add in the beginning. |
I have added this in the latest commit. WDYT? |
|
It looks so much better now, it's much clearer and easier for beginners to see what came from where and what activated it. As someone who uses the vanilla version of kickstart.nvim, I really like it. |
|
I must admit that if there are any differences in file opening speed or performance, I don't see them between lazy.nvim (master) and vim.pack + vim.loader (f9b6223) - or maybe my eyes are that bad. |
Migrate from lazy.nvim to vim.pack.
Caution
This changes a lot of the config, so I'm looking for any
feedback about the new structure / explanations.
Tasks / need feedback:
vim.pack.addin the beginning vsvim.pack.addnear each relevantrequirevim.packMaybe add more lazy loading for heavier plugins?Seems like the performance is good enough without it :)MiniMisc.safely()If you want to make it easier to see the diff, I suggest cloning and running
git diff --ignore-all-space --ignore-blank-lines e099979958b110ab20524e67e1f57ddef9eb6cb0(or the commit id of the first commit, if I rebase this branch)fixes #1630